<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
	<title></title>
	<link rel="stylesheet" type="text/css" href="../css/aui.css" />

</head>

<body>
	<header class="aui-bar aui-bar-nav" id="aui-header">
		<a class="aui-btn aui-btn-info aui-pull-left" id="back"> <span class="aui-iconfont aui-icon-left"></span> </a>
		<div class="aui-title" id="header-title" style="font-size: 1 rem"></div>
		<a class="aui-btn aui-btn-info aui-pull-right" id="share" style="display:none;"> <span class="aui-iconfont aui-icon-share"></span> </a>
	</header>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/util.js"></script>
<script type="text/javascript">
	apiready = function() {
		//			var header = $api.byId('aui-header');
		//			//$api.fixStatusBar(header);
		//			var headerPos = $api.offset(header);
		var header = $api.dom('header');
		var headerH = $api.fixStatusBar(header);
		var headerPos = $api.offset(header);
		var pageParam = api.pageParam;
		if (pageParam.title) {
			$api.html($api.byId("header-title"), pageParam.title);
		}
		api.openFrame({
			name: 'browser',
			url: pageParam.url,
			rect: {
				x: 0,
				y: headerPos.h,
				w: 'auto',
				h: 'auto'
			},
			bgColor: '#FFFFFF',
			bounces: false,
			pageParam: {
				y: headerPos.h,
				id: pageParam.id
			}
		});
		// 返回按钮
		$api.addEvt($api.byId('back'), 'click', function() {
			api.closeWin();
		});
	};
</script>

</html>
